package com.spring.controller;

import com.spring.annotation.MyServlet;
import com.spring.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

//所有请求的方法都放到controller包中
@MyServlet
public class HelloController {
    //很多方法
    @RequestMapping(value="/hello",method="GET")
    public void hello(HttpServletRequest request, HttpServletResponse response){
//处理请求
        System.out.println("HelloController hello()");
    }
    @RequestMapping(value="/hello/delete",method="GET")
    public void delete(HttpServletRequest request, HttpServletResponse response){
//处理请求
        System.out.println("HelloController delete()");
    }
    @RequestMapping(value="/hello/edit",method="GET")
    public void edit(HttpServletRequest request, HttpServletResponse response){
//处理请求
        System.out.println("HelloController edit()");
    }
}
